This invention relates to databases and, more specifically, to methods and apparatus for managing the amount of memory available to processes within the computer system.
It cannot be gainsaid that the amount of memory available to a computer application program is a primary concern for most program developers and users. An address space is the amount of memory available to a computer application program and is the set of all addresses in memory that is available for use by an application program.
The address space can be larger than the main memory for a given computer platform by employing the concept of virtual memory. Virtual memory is an imaginary memory area supported by most operating systems. Application programs use virtual addresses rather than real addresses to store instructions and data. During execution of an application program, only those portions of the application program needed at a given point during execution are copied into main memory.
However, the size of the address space is a function of the operating system and hardware platform. For most binary machines the address space is equal to 2**n, where n is the number of bits in the absolute address. For example, the IBM OS/390 is a 31-bit machine and thus, the size of the address space is up to 2**31 bytes or 2 gigabytes of memory. An address space of limited size imposes a limit on the number of computer processes that can be executed at any given time. In the case of relational database systems, there is a set of memory structures and processes called a database server. The database server performs the work of a database system by using the set of memory structures and processes to communicate with user processes and to control and manipulate data. The amount of memory available to a database server is limited by the size of the address space imposed by the operating system and hardware platform of the database server. Various approaches have been tried to avoid the address space size limitation.
In one approach, Transaction Processing monitors (xe2x80x9cTP monitorsxe2x80x9d) are used to circumvent the limited amount of memory available to a database server. For example, assume there are 100,000 concurrent user sessions for a particular database server. The TP monitor is used to manage the user sessions such that, at any given time, the database server sees only a fraction of the total number of sessions.
One drawback to this approach is that the application programs have to be specifically designed to take advantage of TP monitors. Also, TP monitors do not maintain continuous session state information. Many application programs used in relational database systems require the maintenance of continuous session state information. For example, assume that a user requested to look at 1000 records from the database. However, as a practical matter, the user sees only a small subset of the records at a time. The session state information keeps track of what records are left to fetch for the user""s session. Thus, the use of a TP monitor or other intermediate servers imposes design limitations on application programs and is therefore not a general solution to the problem of limited address space.
In another approach, parallel servers are employed to allow multiple database servers to share a single database. That is, two or more database servers running on two or more different machines provide parallel access to the same database. However, the disadvantage to using parallel servers is the high overhead costs due to the operational complexity and additional hardware. Another disadvantage to using parallel servers is the degraded reliability and performance as compared to a single non-parallel server database server that is supporting the same user sessions.
Based on the foregoing, there is a need for a method or mechanism to increase the amount of memory available to computer processes.
The foregoing needs are addressed by the present invention, which comprises, in one aspect, a method and system for managing the amount of memory available to processes within a computer system.
According to one aspect of the invention, additional virtual address spaces are dynamically created to make more memory available to processes. According to another aspect, the processes executing in each virtual address space access a shared memory region.
Still other objects and advantages of the present invention will become readily apparent from the following detailed description, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawing and description are to be regarded as illustrative in nature, and not as restrictive.